package com.koala.learn.bianma;

import cn.hutool.crypto.SecureUtil;
import org.junit.Test;

/**
 * Md5 编码
 *
 * @author yantingrui
 * @date 2022/6/30   14:53
 */
public class Md5Test {

    private static final String key = "8545afb4df9befd0c44689aa3e5eaa2f";
    private static final String pkey = "402de6255174a96092d572491d0c0368";

    public static void main(String[] args) {
        String md5Pre = String.format("address=%s&city=%s&key=%s%s", "街道", "武汉", "402de6255174a96092d572491d0c0368", "8545afb4df9befd0c44689aa3e5eaa2f");
        String s = SecureUtil.md5(md5Pre);
        System.out.println(s);
    }

    /**
     * 逆地址解析
     */
    @Test
    public void test26() {
        String md5Pre = String.format("key=%s&location=%s%s", pkey, "114.409798,30.507001", key);
        String s = SecureUtil.md5(md5Pre);
        System.out.println(s);
    }


    /**
     *
     */
    @Test
    public void test37(String... s) {

    }
}
